#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
from socket import *        # Import socket module
 
s = socket()                # Create a socket object
host = "192.168.0.100"      # gethostname() # Get local machine name
port = 8282                 # Reserve a port for your service.
 
print 'Connecting to %s:%s' % (host, port)
s.connect((host, port))
 
while True:
    msg = raw_input('CLIENT >> ')
    s.send(msg)
    msg = s.recv(1024)
    print 'SERVER >> ', msg
